from .models import *
from .forms import SystemSettingForm
from xadmin import site as adminx_site

# Register your models here.


class SystemSettingAdmin(object):
    form = SystemSettingForm
    list_display = ('postage', 'postage_preferential', 'procedure', 'procedure_preferential', 'repo_cost_preferential')

    def has_add_permission(self, request):
        return False
    def has_delete_permission(self, request, obj=None):
        return False
adminx_site.register(SystemSetting, SystemSettingAdmin)


class SystemLogAdmin(object):
    list_display = ('level', 'text_log', 'json_log', 'get_add_time')
    fields = ('level', 'text_log', 'json_log')
adminx_site.register(SystemLog, SystemLogAdmin)
